<?php
class Component_Videopodcast_Helpers_data extends appRain_Base_Objects
{
     public function thumbList($exclode=null){
        $videos = App::InformationSet('videopodcast')
                ->setPagination('yes')
                ->setLimit(4)
                ->findAll(
                    '1 ORDER By RAND()',
                    array(
                        array(
                            'status'=>'Active'
                        )
                    )
                );
        $html = '<h2>Other Videos</h2>';
        foreach($videos['data'] as $row){
            if( $exclode != $row['id']){
                $html .= "<p>"; 
                $html .=    App::Helper('Html')->LinkTag(
                        App::Config()->baseUrl("/videopodcast/index/{$row['id']}"),
                        App::Helper('Html')->ImgTag($row['thumburl'])
                    );   
                $html .=    "<br /><strong>"  . substr($row['title'],0,40) . "</strong> "  . substr($row['duration'],0,40) . "";
                $html .= "</p>";
            }
        }
        return $html;
     }
}